package com.ccs.functions;

import java.util.Random;

public class PatientName {
	
	
	public String names(int x) throws Exception {
		
		String [] names = {	"Liam",
							"Sawyer",
							"Marcus", 
							"Zoe", 
							"Caroline", 
							"Eva", 
							"Skylar", 
							"Stella", 
							"Nathan", 
							"Amelia", 
							"Madison",
							"Hunter",
							"Calvin", 
							"Caleb", 
							"Eli", 
							"Sebastian", 
							"Samuel", 
							"Harper", 
							"Emily", 
							"Mercury"};
		Random r = new Random();
		
		if(x==1){
			String lastName = names[r.nextInt(names.length)];
			return(lastName);
		}
		else if(x==2){
			String firstName = names[r.nextInt(names.length)];	
			return(firstName);
		}
		else{
			System.out.println("No name returned from array.");
			String message = "";
			return message;
		}
		
	}
	
	

}
